/*
 * TeacherIterator.h
 *
 *  Created on: 13 May 2010
 *      Author: Savramis Sartios
 */

#ifndef TEACHERITERATOR_H_
#define TEACHERITERATOR_H_
#include "ITeacherIterator.h"
#include "../../Lists/TeacherList/ITeacherList.h"

class TeacherIterator : public ITeacherIterator {

public:
	TeacherIterator();

	TeacherIterator(const ITeacherList *teachers);

	virtual ~TeacherIterator();

	virtual bool		first();

	virtual	bool		next();

	virtual	bool		isDone();

	virtual ITeacher *	getTeacher();

	virtual	string	 *	getTeacherCode(const string *name,const string *lastName);

	virtual string	 *	getTeacherName(const string *code);

	virtual	string	 *	getTeacherLastName(const string *code);
protected:
	virtual bool	setCurrent(const int *current);
	virtual bool	increaseCurrent();
	virtual	int		getCurrent();
private:
	bool	initIterator();
	bool	setTeachers(const ITeacherList *teachers);

	vector<ITeacher*>::iterator	it_;
	ITeacherList				*teachers_;
	int current_;
};

#endif /* TEACHERITERATOR_H_ */
